<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>指令的参数就是html属性绑定</title>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<style>
    nima {
        width: 100%;
        height: 150px;
    }
</style>
<body>
<div id="app">

    <div class="nima" v-bind:hao="nima">呵呵哒</div>

</div>

<script>

    var v = new Vue({
        el: '#app',
        data: {
            nima: "123"
        },

    })

    setTimeout(function () {
        v.nima = "wangbadan";
        //此时，$el的值还未改变
        alert(document.getElementsByClassName("nima")[0].getAttribute("hao"));//还是123
        setTimeout(function () {
            alert(document.getElementsByClassName("nima")[0].getAttribute("hao"));
        }, 1500)


    }, 1000)
</script>

</body>
</html>